function(libobcdc_unittest case)
  if(ARGC EQUAL 1)
    add_executable(${case} ${case}.cpp)
  else()
    add_executable(${ARGV})
  endif()
  target_link_libraries(${case} PRIVATE obcdc gtest gmock)
  target_include_directories(${case}
    PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/unittest ${CMAKE_SOURCE_DIR}/deps/oblib/unittest)
endfunction()

libobcdc_unittest(test_log_part_mgr)
libobcdc_unittest(test_log_task_pool)
libobcdc_unittest(test_small_arena)
libobcdc_unittest(test_log_config)
libobcdc_unittest(test_log_fake_common_config)
libobcdc_unittest(test_log_table_matcher)
libobcdc_unittest(test_ob_map_queue)
libobcdc_unittest(test_ob_map_queue_thread)
#libobcdc_unittest(test_ob_log_timer)
libobcdc_unittest(test_ob_log_dlist)
#libobcdc_unittest(test_ob_log_part_svr_list)
#libobcdc_unittest(test_ob_log_all_svr_cache)
#libobcdc_unittest(test_ob_log_start_log_id_locator)
libobcdc_unittest(test_log_utils)
libobcdc_unittest(test_ob_log_adapt_string)
libobcdc_unittest(test_ob_concurrent_seq_queue)
libobcdc_unittest(test_ob_cdc_part_trans_resolver)
libobcdc_unittest(test_log_svr_blacklist)
libobcdc_unittest(test_ob_cdc_sorted_list)
libobcdc_unittest(test_ob_log_safe_arena)
